﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace COM.Service
{
    /// <summary>
    /// 服务注册
    /// </summary>
    public interface IUnity
    {
        IUnity Register<I, T>() where T : I;
        /// <summary>
        /// 单例服务要慎重注册,单例服务不可引用会话服务
        /// </summary>
        /// <typeparam name="I"></typeparam>
        /// <typeparam name="T"></typeparam>
        /// <returns></returns>
        IUnity RegisterSingleton<I, T>() where T : I;
        I GetService<I>() where I:class;
    }
}
